//
//  HNSH_XFBManage.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2024/2/22.
//

#import "HNSH_XFBManage.h"
#import "ST_PageView.h"
#import "HNSH_XFBManageTopView.h"

@interface HNSH_XFBManage ()

/* topView */
@property (nonatomic, strong) HNSH_XFBManageTopView *topView;

@end

@implementation HNSH_XFBManage

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self showNavTitle:@"消费记录" showLeftItem:YES];
    
    [self.view addSubview:self.topView];
    [self configPage];
}

- (void)configPage {
    NSMutableArray *vcs = [NSMutableArray arrayWithCapacity:5];
    NSMutableArray *titles = [NSMutableArray arrayWithArray:@[@"消费包列表",@"现有消费包",@"历史消费包"]];
    NSMutableArray *ids = [NSMutableArray arrayWithArray:@[@"0",@"1",@"2"]];
    for (int i = 0; i < 3; i ++) {
        [vcs addObject:@"HNSH_XFBViewController"];
    }
    
    ST_PageView *pageView = [[ST_PageView alloc]initWithFrame:CGRectMake(0, kStatusBarHeight+110, kScreenWidth, kScreenHeight-kStatusBarHeight-100) withTitles:titles withViewControllers:vcs withParameters:ids];
    pageView.isAnimated = NO;
    pageView.selectedColor = [UIColor appGreenColor];
    pageView.unselectedColor = [UIColor appBlackLabelColor];
    pageView.selectedLineColor = [UIColor appGreenColor];
    pageView.leftSpace = pageView.rightSpace = 20;
    pageView.isShowTopTabBottomLine = NO;
    pageView.isAverage = YES;
    pageView.font = [UIFont systemFontOfSize:16];
    pageView.scrollView.backgroundColor = [UIColor clearColor];
    [self.view addSubview:pageView];
}

- (HNSH_XFBManageTopView *)topView {
    if (!_topView) {
        _topView = [[HNSH_XFBManageTopView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight+155)];
    }
    return _topView;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
